﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using modele.interfaces;
using modele.impl;

namespace UI
{
    class FabriqueCaseVue
    {
        private CaseVue DesertVue=null;
        private CaseVue PlaineVue=null;
        private CaseVue MontagneVue=null;

        CaseVue getCase(Case c)
        {
            if (c is Desert)
            {
                if (DesertVue == null)
                    DesertVue = new CaseVue(c);
                return DesertVue;
            }
            if (c is Plaine)
            {
                if (PlaineVue == null)
                    PlaineVue = new CaseVue(c);
                return PlaineVue;
            }
            if (c is Montagne)
            {
                if (MontagneVue == null)
                    MontagneVue = new CaseVue(c);
                return MontagneVue;
            }
            throw new Exception("Problème FabriqueCaseVue");
        }
    }
}
